// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Fluent;
using Elastic.Clients.Elasticsearch.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Sql;

public sealed partial class GetAsyncResponse : ElasticsearchResponse
{
	/// <summary>
	/// <para>
	/// Column headings for the search results. Each object is a column.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("columns")]
	public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Sql.Column>? Columns { get; init; }

	/// <summary>
	/// <para>
	/// Cursor for the next set of paginated results. For CSV, TSV, and
	/// TXT responses, this value is returned in the <c>Cursor</c> HTTP header.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("cursor")]
	public string? Cursor { get; init; }

	/// <summary>
	/// <para>
	/// Identifier for the search. This value is only returned for async and saved
	/// synchronous searches. For CSV, TSV, and TXT responses, this value is returned
	/// in the <c>Async-ID</c> HTTP header.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("id")]
	public string Id { get; init; }

	/// <summary>
	/// <para>
	/// If <c>true</c>, the response does not contain complete search results. If <c>is_partial</c>
	/// is <c>true</c> and <c>is_running</c> is <c>true</c>, the search is still running. If <c>is_partial</c>
	/// is <c>true</c> but <c>is_running</c> is <c>false</c>, the results are partial due to a failure or
	/// timeout. This value is only returned for async and saved synchronous searches.
	/// For CSV, TSV, and TXT responses, this value is returned in the <c>Async-partial</c> HTTP header.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("is_partial")]
	public bool IsPartial { get; init; }

	/// <summary>
	/// <para>
	/// If <c>true</c>, the search is still running. If false, the search has finished.
	/// This value is only returned for async and saved synchronous searches. For
	/// CSV, TSV, and TXT responses, this value is returned in the <c>Async-partial</c>
	/// HTTP header.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("is_running")]
	public bool IsRunning { get; init; }
}